{include file="page_header"}
<script>
//    function checkGiftLogin(){
//        var gift_card = localStorage.getItem("gift_card");
//        if(!gift_card){
//            window.location.href = "{url('giftcard/index/index')}";
//        }
//    }
//    checkGiftLogin();
</script>
<form action="{url('index/take')}" method="post" class="validation">
    <div class="con b-color-f" id="checkPage">
        <div class="flow-consignee margin-lr">
            <div class="text-all dis-box j-text-all">
                <label>收货人<em class="color-red">*</em></label>
                <div class="box-flex input-text">
                    <input name='consignee' class="j-input-text" type="text" placeholder="请输入收货人姓名" datatype="*" nullmsg="请输入收货人姓名" value="{$consignee_list.consignee}" id='realname'/>
                    <i class="iconfont icon-guanbi1 close-common j-is-null"></i>
                </div>
            </div>
            <div class="text-all dis-box j-text-all">
                <label>手机号码<em class="color-red">*</em></label>
                <div class="box-flex input-text">
                    <input class="j-input-text" name='mobile' type="tel" placeholder="请输入联系电话" errormsg="手机号码格式不正确" datatype="m" nullmsg="请输入联系电话" value="{$consignee_list.mobile}" id="phone"/>
                    <i class="iconfont icon-guanbi1 close-common j-is-null"></i>
                </div>
            </div>
            <!--address-start-->
            <div class="text-all" id="editAddressForm">
                <input type="hidden" id="province_id" datatype="*" nullmsg="请选择所在地区" name="province_region_id" value="{$consignee_list.province_id}">
                <input type="hidden" id="city_id" name="city_region_id" value="{$consignee_list.city_id}">
                <input type="hidden" id="district_id" name="district_region_id" value="{$consignee_list.district_id}">
                <input type="hidden" id="town_id" name="town_region_id" value="{$consignee_list.town_region_id}">
                <input type="hidden" id="village_id" name="village_region_id" value="">
                <input type="hidden" id="region_id" name="region_id" value="">
                <input type="hidden" id="address_id" name="address_id" value="{$consignee_list.address_id}">
                <div class="address-box" id="selectAddressBtn" region-data="">
                        <label class="fl">所在地区<em class="color-red">*</em></label>
                        <span class="fl text-all-span addressdetail" id="addressLabelId">{$consignee_list.province}{$consignee_list.city}{$consignee_list.district}{$consignee_list.town}{$consignee_list.village}</span>
                        <span class="t-jiantou fr"><i class="iconfont icon-jiantou tf-180"></i></span>
                </div>
            </div>
            <!--address-end-->
            <div class="text-all ">
                <label>详细信息<em class="color-red">*</em></label>
                <div class="box-flex input-text">
                    <input class="j-input-text wx-location" name='address' type="text" value="{$consignee_list.address}" placeholder="详细地址" datatype="*" nullmsg="请输入详细地址" id='addr_de'/>
                    <i class="iconfont icon-guanbi1 close-common j-is-null"></i>
                </div>
            </div>
            <div class="ect-button-more dis-box m-top12">
                <input type="hidden" name="goods_id" value="{$goods_id}">
                <input type="submit" name="submit"  class="btn-submit box-flex br-5 min-two-btn"  value="确认提货"/>
            </div>
        </div>
    </div>
    <!--地区选择 s-->
    {include file="address"}
    <!--地区选择 e-->
</form>

<!--快捷导航-->
{include file="float_nav"}
{include file="float_nav_footer"}
<script>
    $(function () {
        $.Tipmsg.r = null;
        $(".validation").Validform({
            tiptype: function (msg) {
                d_messages(msg);
            },
            tipSweep: true,
            ajaxPost: true,

            callback: function (data) {
                if (data.error == 0) {
                    d_messages(data.content);
                    localStorage.removeItem("gift_card");
                    setTimeout(function(){
                        window.location.href = "{url('index/order')}";
                    }, 500)
                } else {
                    d_messages(data.info);
                }
            }
        });
    })
</script>
</body>
</html>